package javaCode.chapter03.练习;

public class 逻辑运算符exercise01 {

    public static void main(String[] args) {

        int x=5;
        int y=5;
        if (x++==6 &++y==6){ // x先比较后++   比较完之后x=6
            x=11;
        }
        System.out.println("x="+x+", y="+y);

        int x1=5,y1=5;
        if (x1++==6 && ++y1==6){
            x1=11;
        }
        System.out.println("x1="+x1+", y="+y1);   //6  6

        int x2=5;
        int y2=5;
        if (x2++==5 | ++y2==5){
            x2=11;
        }
        System.out.println("x2="+x2+", y2="+y2);    //6  5

        int x3=5;
        int y3=5;
        if (x3++==5 || ++y3==5){
            x3=11;
        }
        System.out.println("x3="+x3+", y3="+y3);     //11  5

        boolean a=true,b=false;
        short z=46;
        if ((z++==46) && (b=true )) z++;


        if ((a=false) || (++z==49)) z++;

        System.out.println("z="+z);

    }
}
